import { Message } from '@/types/common/components.ts';
import MessageNode from '@/components/lib/message/Message.vue';
import { h, render } from 'vue';
export const message = (msg: Message) => {
  // 组件关闭时的回调
  msg.duration = () => {
    //3、 删除组件
    render(null, document.body);
  };
  //1、拿到VNode
  const VNode = h(MessageNode, msg);
  //2、render VNode
  render(VNode, document.body);
};
